import openpyxl

myBook=openpyxl.load_workbook('员工表.xlsx',data_only=True)
mySheet=myBook.active

for myRow in list(mySheet.rows)[1:]:
	myList=[]
	myStr=myRow[1].value
	myMax=myStr.count('-')
	myCount=1
	while myCount<=myMax:
		myParts=list(myStr.partition('-'))
		myList+=[myParts[0]]
		myStr=myParts[2]
		if myCount==myMax:
			myList+=[myParts[2]]
		myCount+=1
	del myList[0]
	del myList[1]
	myRow[1].value='-'.join(myList)
myBook.save('结果表-员工表.xlsx')